import QtQuick 2.0

import "../common"
import "../../js/util.js" as Util
import "../../js/UI.js" as Style

Page{
    id: collegepage
    property Component component: null
    property var m_objects: new Array
    signal subpageSignal(var code,var data)
    onSubpageSignal: {
        Util.popView(m_objects)
    }
    Flickable{
        id: fiick
        anchors{
            top: parent.top
            left: parent.left
            right: parent.right
        }
        width: parent.width
        height: parent.height
        contentHeight: column.childrenRect.height
        clip: true
        Column{
            id: column
            width: parent.width
            height: m_lineValue*9
            Item{
                id: m_title
                width: parent.width
                height: width*0.3
                Image{
                    anchors.fill: parent
                    source: "qrc:/image/college/beijing.jpg"
                }
                AText{
                    anchors.left: parent.left
                    anchors.leftMargin: 0.3*m_lineValue
                    anchors.verticalCenter: parent.verticalCenter
                    color: "#ffffff"
                    font.pointSize: 25
                    text: qsTr("学院")
                }
            }
            Item{
                id: m_work
                anchors.top: m_title.bottom
                anchors.topMargin: 0.2*m_lineValue
                anchors.left: parent.left
                anchors.leftMargin: 0.2*m_lineValue
                anchors.right: parent.right
                anchors.rightMargin: 0.2*m_lineValue
                height: childrenRect.height
                Column{
                    anchors.fill: parent
                    Row{
                        width: parent.width
                        height: m_lineValue*2
                        BaseLine{
                            width: parent.width/2-0.5
                            height: parent.height
                            Image{
                                id:m_college_image
                                anchors.centerIn: parent
                                sourceSize: Qt.size(parent.width*0.15,parent.width*0.15)
                                source: "qrc:/image/college/m_college.png"
                            }
                            AText{
                                anchors.top: m_college_image.bottom
                                anchors.topMargin: 0.1*m_lineValue
                                anchors.horizontalCenter: parent.horizontalCenter
                                font.pointSize: 12
                                text: qsTr("学院介绍")
                            }
                            onMouseclickSignal: {
                                Util.pushView(component,m_objects,"qrc:/qml/form/college/ShowList.qml",m_root_id,{})
                            }
                        }
                        Rectangle{
                            height: m_lineValue*2
                            width: 1
                            color: "#f6f5ec"
                        }
                        BaseLine{
                            width: parent.width/2-0.5
                            height: parent.height
                            Image{
                                id:m_major_image
                                anchors.centerIn: parent
                                sourceSize: Qt.size(parent.width*0.15,parent.width*0.15)
                                source: "qrc:/image/college/m_major.png"
                            }
                            AText{
                                anchors.top: m_major_image.bottom
                                anchors.topMargin: 0.1*m_lineValue
                                anchors.horizontalCenter: parent.horizontalCenter
                                font.pointSize: 12
                                text: qsTr("专业介绍")
                            }
                            onMouseclickSignal: {
                                Util.pushView(component,m_objects,"qrc:/qml/form/college/Majorintroduction.qml",m_root_id,{})
                            }
                        }
                    }
                    Rectangle{
                        width: parent.width
                        height: 1
                        color: "#f6f5ec"
                    }
                    Row{
                        width: parent.width
                        height: m_lineValue*2
                        BaseLine{
                            width: parent.width/2-0.5
                            height: parent.height
                            Image{
                                id:m_build_image
                                anchors.centerIn: parent
                                sourceSize: Qt.size(parent.width*0.15,parent.width*0.15)
                                source: "qrc:/image/college/m_build.png"
                            }
                            AText{
                                anchors.top: m_build_image.bottom
                                anchors.topMargin: 0.1*m_lineValue
                                anchors.horizontalCenter: parent.horizontalCenter
                                font.pointSize: 12
                                text: qsTr("专业建设")
                            }
                            onMouseclickSignal: {
                                Util.pushView(component,m_objects,"qrc:/qml/form/college/Construction.qml",m_root_id,{})
                            }
                        }
                        Rectangle{
                            height: m_lineValue*2
                            width: 1
                            color: "#f6f5ec"
                        }
                        BaseLine{
                            width: parent.width/2-0.5
                            height: parent.height
                            Image{
                                id:m_com_image
                                anchors.centerIn: parent
                                sourceSize: Qt.size(parent.width*0.15,parent.width*0.15)
                                source: "qrc:/image/college/m_competition.png"
                            }
                            AText{
                                anchors.top: m_com_image.bottom
                                anchors.topMargin: 0.1*m_lineValue
                                anchors.horizontalCenter: parent.horizontalCenter
                                font.pointSize: 12
                                text: qsTr("竞赛介绍")
                            }
                            onMouseclickSignal: {
                                Util.pushView(component,m_objects,"qrc:/qml/form/college/Competition.qml",m_root_id,{})
                            }
                        }
                    }
                    Rectangle{
                        width: parent.width
                        height: 1
                        color: "#f6f5ec"
                    }
                    Row{
                        width: parent.width
                        height: m_lineValue*2
                        BaseLine{
                            width: parent.width/2-0.5
                            height: parent.height
                            Image{
                                id:m_laboratory_image
                                anchors.centerIn: parent
                                sourceSize: Qt.size(parent.width*0.15,parent.width*0.15)
                                source: "qrc:/image/college/m_laboratory.png"
                            }
                            AText{
                                anchors.top: m_laboratory_image.bottom
                                anchors.topMargin: 0.1*m_lineValue
                                anchors.horizontalCenter: parent.horizontalCenter
                                font.pointSize: 12
                                text: qsTr("实验室")
                            }
                            onMouseclickSignal: {
                                Util.pushView(component,m_objects,"qrc:/qml/form/college/Laboratory.qml",m_root_id,{})
                            }
                        }
                        Rectangle{
                            height: m_lineValue*2
                            width: 1
                            color: "#f6f5ec"
                        }
                        BaseLine{
                            width: parent.width/2-0.5
                            height: parent.height
                            Image{
                                id:m_lectrue_image
                                anchors.centerIn: parent
                                sourceSize: Qt.size(parent.width*0.15,parent.width*0.15)
                                source: "qrc:/image/college/m_lecture.png"
                            }
                            AText{
                                anchors.top: m_lectrue_image.bottom
                                anchors.topMargin: 0.1*m_lineValue
                                anchors.horizontalCenter: parent.horizontalCenter
                                font.pointSize: 12
                                text: qsTr("学科讲座")
                            }
                            onMouseclickSignal: {
                                Util.pushView(component,m_objects,"qrc:/qml/form/college/Lecture.qml",m_root_id,{})
                            }
                        }
                    }
                    Rectangle{
                        width: parent.width
                        height: 1
                        color: "#f6f5ec"
                    }
                    Row{
                        width: parent.width
                        height: m_lineValue*2
                        BaseLine{
                            width: parent.width/2-0.5
                            height: parent.height
                            Image{
                                id:m_rec_image
                                anchors.centerIn: parent
                                sourceSize: Qt.size(parent.width*0.15,parent.width*0.15)
                                source: "qrc:/image/college/m_recruitment.png"
                            }
                            AText{
                                anchors.top: m_rec_image.bottom
                                anchors.topMargin: 0.1*m_lineValue
                                anchors.horizontalCenter: parent.horizontalCenter
                                font.pointSize: 12
                                text: qsTr("招办")
                            }
                            onMouseclickSignal: {
                                Util.pushView(component,m_objects,"qrc:/qml/form/college/Recruit.qml",m_root_id,{})
                            }
                        }
                        Rectangle{
                            height: m_lineValue*2
                            width: 1
                            color: "#f6f5ec"
                        }
                        Rectangle{
                            width: parent.width/2-0.5
                            height: parent.height
                            color: "transparent"
                        }

                    }
                    Rectangle{
                        width: parent.width/2
                        height: 1
                        anchors.left: parent.left
                        color: "#f6f5ec"
                    }
                }
            }
        }
    }
}
